package com.dataextend.service.impl;

import com.dataextend.mapper.cluster.UserDao;
import com.dataextend.entity.UserEntity;
import com.dataextend.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public int add(UserEntity userEntity) {
        return userDao.add(userEntity);
    }

    @Override
    public int update(UserEntity userEntity) {
        return userDao.update(userEntity);
    }

    @Override
    public void delete(Long id) {
        userDao.delete(id);
    }

    @Override
    public UserEntity queryById(Long id) {
        return userDao.queryById(id);
    }

    @Override
    public List<UserEntity> list() {
        return userDao.list();
    }

    @Override
    public UserEntity queryByUser(String user) {
        return userDao.queryByUser(user);
    }
}
